Testing Color
Testing the Color¶
In [2]:
import numpy as np
np.set_printoptions(precision=3, suppress=True)
import pylab
import matplotlib.pyplot as plt
%matplotlib inline
In [3]:
import MotionClouds as mc
fx, fy, ft = mc.get_grids(mc.N_X, mc.N_Y, mc.N_frame)
#mc.recompute = True
mc.notebook = True
In [8]:
import os
name = 'color'
fx, fy, ft = mc.get_grids(mc.N_X, mc.N_Y, mc.N_frame)
z = mc.envelope_color(fx, fy, ft)
mc.figures(z, name)
mc.show_video2(name)
In [9]:
# explore parameters
for alpha in [0.0, 0.5, 1.0, 1.5, 2.0]:
# resp. white(0), pink(1), red(2) or brownian noise (see http://en.wikipedia.org/wiki/1/f_noise
name_ = name + '-alpha-' + str(alpha).replace('.', '_')
z = mc.envelope_color(fx, fy, ft, alpha)
mc.figures(z, name_)
mc.show_video2(name_)
In [10]:
for ft_0 in [0.125, 0.25, 0.5, 1., 2., 4., np.inf]:# time space scaling
name_ = name + '-ft_0-' + str(ft_0).replace('.', '_')
z = mc.envelope_color(fx, fy, ft, ft_0=ft_0)
mc.figures(z, name_)
mc.show_video2(name_)
In [15]:
for size in range(5, 7):
N_X, N_Y, N_frame = 2**size, 2**size, 2**size
fx, fy, ft = mc.get_grids(N_X, N_Y, N_frame)
ft_0 = N_X/float(N_frame)
name_ = name + '-size-' + str(size).replace('.', '_')
z = mc.envelope_color(fx, fy, ft, ft_0=ft_0)
mc.figures(z, name_)
mc.show_video2(name_)